﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Management.Automation;
using System.Net;
using System.Xml;
using System.IO;
using System.Web;
using GoGrid;

namespace Readify.Management.Automation.GoGrid
{
    [Cmdlet("Get", "GoGridOption")]
    public class GetGoGridOptionCmdlet : GoGridCmdletBase
    {
        [Parameter(Mandatory = true)]
        public string Lookup { get; set; }

        protected override void ProcessRecord()
        {
            Connection connection = this.GetConnection();

            List<Option> options = connection.ListOptions(this.Lookup);

            foreach (Option option in options)
            {
                this.WriteObject(option);
            }
        }
    }
}
